import type { App } from 'vue'
import type { Directive } from 'vue'
import { animate } from './animate'
import { lazy } from './lazy'
import { auth } from './auth'

const directives: Record<string, Directive> = {
  animate,
  lazy,
  auth,
}

// 自动注册所有的指令
export default {
  install(app: App) {
    for (const key in directives) {
      app.directive(key, directives[key])
    }
  },
}
